package com.asd.map.mapper;

import com.asd.map.entity.Line_surface;
import com.asd.map.entity.vo.Line_surfaceVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author
 * @createtime 2021-09-02 8:47
 * @description
 */
@Mapper
@Component
public interface Line_surfaceMapper extends BaseMapper<Line_surface> {


    @Select("select * from line_surface where did = #{did}")
    List<Line_surface> getByDid(@Param("did") String did);


    @Select("select * from line_surface where did = #{did}")
    List<Line_surfaceVo> findByDid1(Page<Line_surfaceVo> line_surfaceVoPage, @Param("did")String did);

    @Delete("delete from line_surface where did = #{did}")
    void deleteByDid(@Param("did")String did);


    @Select("select * from line_surface where line_surface.data like CONCAT('%',#{0},'%')")
    List<Line_surface> queryByData(String data);
}
